package com.cl.template.jdk;

import java.util.Arrays;

public class DuckSortTestDrive {
    public static void main(String[] args) {
        Duck[] ducks = {
                new Duck("dawd", 12),
                new Duck("zxc", 4),
                new Duck("vvv", 5),
                new Duck("sdf", 5),
                new Duck("juyk", 2)
        };

        for (Duck duck : ducks) {
            System.out.println(duck);
        }

        Arrays.sort(ducks);
        System.out.println("After:");

        for (Duck duck : ducks) {
            System.out.println(duck);
        }


    }
}
